package com.ljf.authority.domain.repository;

import com.ljf.authority.dto.query.AuthorityRelButtonApiQuery;
import com.ljf.authority.model.AuthorityRelButtonApi;
import com.ljf.authority.vo.AuthorityRelButtonApiVO;
import com.ljf.common.domain.entity.KeyCountModel;
import com.ljf.common.domain.repository.IBasisRepository;
import com.ljf.common.exception.ServiceException;

import java.util.List;

/**
 * 按钮API关联  数据访问接口定义
 *
 * @author LJF
 * @since 2024-10-30
 */
public interface AuthorityRelButtonApiRepository extends IBasisRepository<AuthorityRelButtonApiQuery, AuthorityRelButtonApiVO, AuthorityRelButtonApi> {

    /**
     * 分组统计API编码数量
     *
     * @param buttonCodeList
     * @return
     * @throws ServiceException
     */
    List<KeyCountModel> countApiCodeGroupByButtonCode(List<String> buttonCodeList) throws ServiceException;

    /**
     * 分组统计前端数量
     *
     * @param apiCodeList
     * @return
     * @throws ServiceException
     */
    List<KeyCountModel> countButtonCodeGroupByApiCode(List<String> apiCodeList) throws ServiceException;

}
